package com.edu.chapter09_kotlin.model

import java.util.Objects

class MyResponse {
    var code = 0
    var msg: String? = null
    var data: GameInfo? = null
    override fun equals(o: Any?): Boolean {
        if (this === o) return true
        if (o == null || javaClass != o.javaClass) return false
        val that = o as MyResponse
        return code == that.code && msg == that.msg && data == that.data
    }

    override fun hashCode(): Int {
        return Objects.hash(code, msg, data)
    }

    override fun toString(): String {
        return "MyResponse{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}'
    }
}
